<div class="tab">
    <span class="btn" data-index="1">首页</span>
    <span class="btn" data-index="2">详情页</span>
</div>